import request from '/@/utils/request';
import tagState from '/@/utils/pageState/tagState';

const { ALL_TAG } = tagState();

export function useTagsApi() {
	return {
		getTagsList: (status = ALL_TAG) => {
			return request({
				url: `/member/member-tag/admin/list/${status}`,
				method: 'get',
			});
		},
		delTagsById: (id) => {
			return request({
				url: `/member/member-tag/admin/delete/${id}`,
				method: 'get',
			});
		},
		addTags: (params) => {
			return request({
				url: '/member/member-tag/admin/add',
				method: 'post',
				data: params,
			});
		},
		editTags: (params) => {
			return request({
				url: '/member/member-tag/admin/update',
				method: 'post',
				data: params,
			});
		},
	};
}
